package day1020;

import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;

public class Test5 {
    public static void main(String[] args) {
        Map s2=new HashMap();//无序
        s2.put(1001,"张三");
        s2.put(1002,"李四");


        Set<Integer> s= s2.keySet();
        for(Integer n: s){
            System.out.println(n);
        }



        Collection<String> ss= s2.values();
        for(String str:  ss){
            System.out.println(str);
        }







        Set  sse=s=s2.entrySet();
        for (Object  o:  sse){
            Map.Entry e=(Map.Entry)o;
            System.out.println(e.getKey()+"  "+e.getValue());
        }




    }

}
//lambda
